import request from '@/config/axios'

export const deleteLabel = async (id: number) => {
  return await request.delete({ url: '/gallery/labels/delete?id=' + id })
}

export const editLabel = async (data: any) => {
  return await request.put({ url: '/gallery/labels/update', data })
}

export const createLabel = async (data: any) => {
  return await request.post({ url: '/gallery/labels/create', data })
}

export const queryLabels = async (data: any) => {
  return await request.get({
    url: `/gallery/labels/page?galleryId=${data.galleryId}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
    headersType: 'application/x-www-form-urlencoded'
  })
}
